101
101
DOI: 10.1201/9781003214335-8
Introduction to Graphs
Create Your Own Interface
Diagram Instantly
In real life, relationships between people can be good or bad. With data, relationships
are always good. But they are of different types. Sometimes there is a pressing need
to show these data relationships through a picture. As we know, a picture says a thou
sand words. That is why people love cartoons—if it is a good one, you can immedi
ately uncover a 1,000-word story from it.
One such picture is a popular visual sometimes known as an interface diagram. It
shows a source and a target and effectively lays out the direction and content of the
data that flow from one to the other. For example, the inventory information in a ware
house flows into the order processing system so that it can order more parts when the
inventory is depleted.
Converting this source-target information in a spreadsheet to a picture is time con
suming. Wouldn’t it be nice to automatically create it? With a little effort and a lot of
imagination, you can do this through writing a macro that I am about to show you.
7.1 THE ALGORITHM
The algorithm is based on five steps. But before it can begin, the input must be in a
certain format to recognize the source and target fields. To keep things really simple,
we expect the first column to be the source, second column the target, and the third
column a name for the arrow going from source to target. And this is put on a sheet
called “Data”.
7